import { _decorator, Color, Component, Sprite } from 'cc';
const { ccclass, property } = _decorator;

//该脚本挂在每个牌上
@ccclass('EachCard')
export default class EachCard extends Component {
    
    public rise_b: boolean = false;//上升状态
    private _selected_b: boolean = false;//选中状态

    /**获取选中状态 */
    get selected_b(): boolean { return this._selected_b; }

    /**设置选中状态颜色 */
    set selected_b(v_b: boolean) {
        if (this._selected_b == v_b) { return; }
        this._selected_b = v_b;
        this.node.getComponent(Sprite).color = this._selected_b ? Color.GRAY : Color.WHITE;
    }

}


